//
//  NavResults.m
//  iCan - iPhone Context-Aware Navigation
//  Carnegie Mellon University - 18-842 Distributed Systems
//
//  Created by Andrew Santell on 3/26/12.
//  Copyright (c) 2012 Andrew Santell. All rights reserved.

/* Displays directons to user */

#import "NavResults.h"

@interface NavResults ()

@end

@implementation NavResults
@synthesize srcText, destText, dirText;
@synthesize srcLabel, destLabel;
@synthesize scrollView;
@synthesize directions;
@synthesize appDelegate;

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
	
    appDelegate = [[UIApplication sharedApplication] delegate];
    
    srcLabel.text = srcText;
    destLabel.text = destText;
    directions.text = dirText;
}

- (void)viewDidUnload
{
    [self setDestText:nil];
    [self setSrcText:nil];
    [self setScrollView:nil];
    [self setDirText:nil];
    [self setDirections:nil];
    [self setSrcLabel:nil];
    [self setDestLabel:nil];
    [self setScrollView:nil];
    [self setAppDelegate:nil];
    
    [super viewDidUnload];
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    return (interfaceOrientation == UIInterfaceOrientationPortrait);
}

@end
